home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (Latin America) Volume 1 #6 / CD-ROM Today 6 Latam.iso / referenc / evol / database.dxr / 00095_CSZ.ls < prev    next >
Encoding:
Text File  |  1996-11-08  |  1.6 KB  |  47 lines

  1. on CheckScrollZones
  2.   global gDisplayMem, gScrollArrowCh, gNextArticle, gScrollLine, gScrollTop, gScrollBotDB, gfrac
  3.   set ReturnVal to 0
  4.   puppetSprite(gScrollArrowCh, 1)
  5.   set ScrArrX to 120
  6.   if rollOver(14) then
  7.     DBupCursor()
  8.     set the locH of sprite gScrollArrowCh to 200
  9.     set the locV of sprite gScrollArrowCh to 188
  10.     set the memberNum of sprite gScrollArrowCh to 16
  11.     set CurrTop to the scrollTop of member gDisplayMem
  12.     set NewTop to CurrTop - 10
  13.     if NewTop < 0 then
  14.       set NewTop to 0
  15.     end if
  16.     set the scrollTop of member gDisplayMem to NewTop
  17.     set ReturnVal to 1
  18.     set gNextArticle to "..."
  19.   else
  20.     if rollOver(15) then
  21.       DBdownCursor()
  22.       set the locH of sprite gScrollArrowCh to 200
  23.       set the locV of sprite gScrollArrowCh to 188
  24.       set the memberNum of sprite gScrollArrowCh to 15
  25.       set CurrTop to the scrollTop of member gDisplayMem
  26.       set NewTop to CurrTop + 10
  27.       set lowerLimit to the height of member gDisplayMem - 10
  28.       if NewTop > lowerLimit then
  29.         set NewTop to lowerLimit
  30.       end if
  31.       set the scrollTop of member gDisplayMem to NewTop
  32.       set ReturnVal to 1
  33.       set gNextArticle to "..."
  34.     else
  35.       set the locH of sprite gScrollArrowCh to -9000
  36.     end if
  37.   end if
  38.   set st to the scrollTop of member gDisplayMem
  39.   set ScrollRange to gScrollBotDB - gScrollTop
  40.   set gfrac to 1.0 * st / the height of member gDisplayMem
  41.   set ScrollCh to 11
  42.   puppetSprite(ScrollCh, 1)
  43.   set the locV of sprite ScrollCh to gScrollTop + (gfrac * ScrollRange)
  44.   set the locH of sprite ScrollCh to gScrollLine
  45.   return ReturnVal
  46. end
  47.